package usermanager

import grails.test.*

class ProjectTests extends GrailsUnitTestCase {
    protected void setUp() {
        super.setUp()
    }

    protected void tearDown() {
        super.tearDown()
    }

    void testSomething() {
		def proj = new Project(projectName: "Tektronix")
		mockForConstraintsTests(Project, [proj])
		def testProject = new Project(projectName :"Tektronix")
		assertFalse testProject.validate()
		assertEquals "unique", testProject.errors["projectName"]
		testProject = new Project(projectName: "Aaaaaaaaaaaaaaaaaaaaaa")
		assertFalse testProject.validate()
		assertEquals "size", testProject.errors["projectName"]
		println testProject.errors
    }
}
